#读取文件中字符串出现的次数
# file = open('text.txt')
# content = file.read()
# print(content.count("Python"))

# with open('./text/text.txt','r',encoding='utf-8') as f:
#     result = f.read()
#     print(result.count('Python'))

#统计文件总行数
# res = file.read()
# print(res)
# str_list = res.split('\n')
# count = 0
# for i in str_list:
#     count += 1
# print(f"总行数为:{count}")

with open('./text/text.txt','r',encoding = 'utf-8') as f:
    content = f.readlines()
    # print(content)
for i in content:
    print(i.strip())






